<?php

namespace App\Models\Enum;

/**
 * 分成比例类型
 */
class ShareRatioType
{
    const SEPARATE = 1;
    const LADDER = 2;

    public static function get($type)
    {
        switch ($type) {
            case self::SEPARATE:
                return '独立计算';
            case self::LADDER:
                return '阶梯计算';
            default:
                return '类型未定义';
        }
    }

    public static function getAll()
    {
        return [
            self::SEPARATE => self::get(self::SEPARATE),
            self::LADDER => self::get(self::LADDER),
        ];
    }
}